class Pedidos < ActiveRecord::Migration
  def self.up
    create_table 'pedidos', :force => false do |t|
      t.column :estado,             :string, :null => true
      t.column :nombre,             :string, :null => true, :limit => 128
      t.column :direccion,          :string, :null => true, :limit => 128
      t.column :cp,                 :string, :null => true, :limit => 20
      t.column :ciudad,             :string, :null => true, :limit => 128
      t.column :pais,               :string, :null => true, :limit => 128
      t.column :email,              :string, :null => true, :limit => 128
      t.column :email_confirmar,    :string, :null => true, :limit => 128
      t.column :notas,              :string, :null => true,  :limit => 512
      t.column :transporte_id,      :integer, :null => false
      t.column :transporte_precio,  :float, :null => false
      t.column :libros_precio,      :float, :null => false, :default => 0
      t.column :created_at,         :datetime
      t.column :updated_at,         :datetime
    end
  end

  def self.down
    drop_table :pedidos
  end
end